<?xml version='1.0' encoding='UTF-8' ?> 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <h:head>
        <title><ui:insert name="title">Default Title</ui:insert></title>
        <h:outputStylesheet library="css" name="pfcrud.css"/>
        <h:outputScript library="scripts" name="pfcrud.js"/>
         <link type="image/x-icon" rel="shortcut icon" href="resources/images/favicon.ico"></link>
         <script type="text/javascript" src="resources/scripts/primeface_locales.js"></script>
        <f:metadata> 
            <f:event listener="#{loginBean.verifyUseLogin}" type="preRenderView"/>   
        </f:metadata> 
    </h:head>

    <h:body>

        <p:growl id="growl" life="5000" showDetail="true"/>            
        <p:layout fullPage="true" rendered="#{loginBean.loggedIn}">
            <p:layoutUnit position="north" size="60" header="#{bundle.AppName}" rendered="#{loginBean.loggedIn}">
                <!-- Menu here. Also a layout and a way to log a user out -->                
                <ui:include src="/appmenu.xhtml" rendered="#{loginBean.loggedIn}"/>
                <ui:include src="/sessionTimeOut.xhtml" rendered="#{loginBean.loggedIn}"/>
            </p:layoutUnit>

            <!--            <p:layoutUnit position="west" size="50"/>
                        <p:layoutUnit position="east" size="50"/>-->
            <p:layoutUnit position="center" rendered="#{loginBean.loggedIn}" size="300" style="height: 300px">
                <ui:insert name="body" rendered="#{loginBean.loggedIn}" />
            </p:layoutUnit>

        </p:layout>

    </h:body>

</html>
